<?php
    class Controller extends System{
        protected function view( $nome, $vars = null ){
            if( is_array($vars) && count($vars) > 0 )
                extract ($vars, EXTR_PREFIX_ALL, 'view');
			if($this->_controller == "admin"){
	            $file = ADMIN_VIEWS .$nome. '.phtml';
			} else {
				$file = VIEWS .$nome. '.phtml';				
			}

                if ( !file_exists($file) )
                    die("Houve um erro. View nao existe.");

            include( $file );
        }
		
		public function init(){}
    }